package com.woniu.model.gh.common.exception;

import com.woniu.model.gh.common.enums.IResultCode;

// 自定义断言类
public abstract class Asserts {

    //断定错误，否则就抛出自定义异常
    public static void error(boolean flag, IResultCode resultCode) {
        //flag为true抛出异常
        if (flag) throw new BusinessException(resultCode);
    }

}
